/*
 * Player.h
 *
 *  Created on: 24.01.2011
 *      Author: JTH
 */

#ifndef PLAYER_H_
#define PLAYER_H_

//#include <WProgram.h>
#include "Arduino.h"

// defines
// defines for formatting data for display or transmit to PC
const int LCDDISPLAY = 1;
const int DATA2PC    = 2;

// todo: race status of the player
const int STOP      = 1;
const int RACE      = 2;
const int REFUEL    = 3;
const int PIT       = 4;
const int JUMPSTART = 5;

class Player
{
public:
	int nr;
	unsigned long lapTime;
	unsigned long fastestLapTime;
	unsigned long timeNow;
	unsigned long startTime;
	int lapCount;
	int racePosition;
	bool fastestPlayer;
	int displaytype;
	int playerstatus;
	volatile bool slotsensor;	//irq routine

	Player();
	Player(int pnr);
	void ResetPlayer();
	void getPlayerStats(char* pStat, int pts);
	bool CheckForJumpStart();
};

#endif /* PLAYER_H_ */
